package com.wnxy.mallserver.entity;

import lombok.Data;
//import org.hibernate.validator.constraints.Length;
//import org.hibernate.validator.constraints.NotBlank;
//
//import javax.validation.constraints.Pattern;


@Data
public class Address {
    private Integer id;
    private Integer uid;
//    @NotBlank(message = "省份不能为空")
//    @Length(min=2,max=10,message = "省份名必须在2-10位之间")
    private String province;
//    @NotBlank(message = "城市不能为空")
    private String city;
//    @NotBlank(message = "郡县不能为空")
    private String county;
    //注意不要导错包
//    @NotBlank(message = "详细地址不能为空")
    private String detailaddress;
//    @NotBlank(message = "收货人不能为空")
    private String accept;
    //手机号的数据校验
//    @Pattern(regexp = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\\\d{8}$",
//             message = "手机号不正确")
    private String cellphone;
//    @Pattern(regexp = "[yn]",message = "只能是y/n")//表示只有一位，且是y / n
    private String defaultaddr;
}
